package com.队列;


import java.util.concurrent.ArrayBlockingQueue;

/**
 * ArrayBlockingQueue
 */
public class 数组阻塞队列 {


    /**
     * 满了会报异常错误 queue full 队列已满
     */

    static ArrayBlockingQueue <Integer> arrayBlockingQueue;

    public static void main(String[] args) {
        arrayBlockingQueue = new ArrayBlockingQueue<Integer>(10);

        for(int i = 0 ; i <100;i++){
            arrayBlockingQueue.add(i);
        }
    }

}
